import { defineStore } from 'pinia'

interface AppSate {
	showindex : Number,
	showi: Number,
	showdel: Boolean,
	applicationindex:Number,
	newid:Number
}

const useAppStore = defineStore({
	id: 'table',
	state: () : AppSate => {
		return {
			showindex: 0,
			showi:0,
			showdel:true,
			applicationindex:0,
			newid:0
		}
	},
	actions: {
		showindexing(index : Number) {
			this.showindex= index
		},
		onshowi(index : Number) {
			this.showi= index
		},
		onshowdel(index : Boolean) {
			this.showdel= index
		},
		onapplicationindex(index : Number) {
			this.applicationindex= index
		},
		onnewid(index : Number) {
			this.newid= index
		},
		
	}
})

export default useAppStore